package com.dingyuhang.controller;


import com.dingyuhang.bean.City;
import com.dingyuhang.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 三级联动，地区
 *
 *
 */
@Controller
public class CityController {
	
	@Autowired
	private CityService cityService;
	
	
	/**
	 * 三级联动
	 * @param pid
	 * @return
	 */
	@RequestMapping("/selectCitys")
	@ResponseBody
	public List<City> selectCitys(Integer pid){
		return cityService.selectCitys(pid);
	}

}
